//
//  YLForgetPasswordViewModel.m
//  YLFinanceService
//
//  Created by she1323 on 2017/8/21.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLForgetPasswordViewModel.h"
#import "WHProgressHUD.h"
@implementation YLForgetPasswordViewModel

- (instancetype)init
{
    if (self = [super init]) {
        [self setUp];
    }
    return self;
}

- (void)setUp
{
    _loginEnableSignal = [RACSignal combineLatest:@[RACObserve(self, phoneNumber), RACObserve(self, codeWithMessage)] reduce:^id _Nullable(NSString *phoneNumber, NSString *codeWithMessage){
        return @(phoneNumber.length && codeWithMessage.length);
    }];
    
    _loginCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
       return [RACSignal createSignal:^RACDisposable * _Nullable(id<RACSubscriber>  _Nonnull subscriber) {
           // 不考虑字符串大小
           return nil;
       }];
    }];
}

@end
